<!-- 详情 -->
<template>
  <web-view v-if="show" :src="pdfUrl" :update-title="false"></web-view>
</template>
<script setup>
  import { ref } from 'vue';
  import { onLoad } from '@dcloudio/uni-app'
  let show = ref(false)
  let pdfUrl = ref('')
  const viewerUrl = '/hybrid/html/web/viewer.html' //引入hybrid包
  onLoad((option) => {
    let url = 'http://why761220.gnway.cc' + option.xxnr
    const fileUrl = encodeURIComponent(decodeURIComponent(url)) //将链接编码
    pdfUrl.value = viewerUrl + '?file=' + fileUrl
    show.value = true
  });
</script>
<style lang="scss">

</style>